<template>
	<view>
		<tui-card>
			<template v-slot:body>
				<view class="tui-default">
					所属研究中心：{{patient.hospital_id_text}}
				</view>
				<view class="tui-default">
					姓名：{{patient.name}}
				</view>
				<view class="tui-default">
					性别：{{patient.gender == '1' ? '男' : '女'}}
				</view>
				<view class="tui-default">
					出生日期：{{patient.birth_date}}
				</view>
				<view class="tui-default">
					联系方式：{{patient.contact}}
				</view>
				<view class="tui-default">
					籍贯：{{patient.native_place}}
				</view>
				<view class="tui-default">
					体重(kg)：{{patient.weight}}
				</view>
				<view class="tui-default">
					身高(cm)：{{patient.height}}
				</view>
				<view class="tui-default">
					现居地：{{patient.current_residence}}
				</view>
				<view class="tui-default">
					救治医院名称：{{patient.hospital_name}}
				</view>
				<view class="tui-default">
					救治医院所在省份：{{patient.hospital_province}}
				</view>
				<view class="tui-default">
					救治医院等级：{{patient.hospital_level_text}}
				</view>
				<view class="tui-default">
					治疗模式：{{patient.treatment_mode}}
				</view>
				<view class="tui-default">
					在医院有烧伤科：{{patient.has_burn_department == 1 ? "有" : '无'}}
				</view>
				<view class="tui-default">
					在医院有烧伤重症监护室：{{patient.has_burn_icu == 1 ? "有" : '无'}}
				</view>
			</template>
		</tui-card>
		<tui-list-cell>
			<tui-form-button @click="goPatientInfo()" plain="true" color="#5677FC" height="2.6" radius="5px">更改患者信息</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(1)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第1-2±1天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(2)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第3±1天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(3)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第7±1天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(4)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第14±1天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(5)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第28±1天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(6)" plain="true" color="#5677FC" height="2.6" radius="5px">发生脓毒症后第1天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(7)" plain="true" color="#5677FC" height="2.6" radius="5px">发生脓毒症后第2天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(8)" plain="true" color="#5677FC" height="2.6" radius="5px">发生脓毒症后第3天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(9)" plain="true" color="#5677FC" height="2.6" radius="5px">创面愈合当日</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(10)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第3个月±3天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(11)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第6个月±3天</tui-form-button>
		</tui-list-cell>
		<tui-list-cell>
			<tui-form-button @click="goPatientInjury(12)" plain="true" color="#5677FC" height="2.6" radius="5px">烧伤后第12个月±3天</tui-form-button>
		</tui-list-cell>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				patientId: 0,
				patient: {},
				injuryList: []
			}
		},
		onLoad(options) {
			this.patientId = options.id;
			this.http.get("/api/patient/detail?id=" + this.patientId)
				.then(res => {
					this.patient = res.data.data.patient;
					this.injuryList = res.data.data.injuryList;
				})
				.catch(err => {
		
				})
		},
		methods: {
			goPatientInfo() {
				uni.navigateTo({
					url: "/pages/patient/info?id=" + this.patientId,
					success: (res) => {

					},
					fail: (err) => {

					}
				})
			},
			goPatientInjury(index) {
				uni.navigateTo({
					url: "/pages/patient/injury" + index + "?id=" + this.patientId
				})
			}
		}
	}
</script>

<style scoped>
	.tui-card {
		margin: 12rpx;
	}
	.tui-default {
		font-size: 32rpx;
		margin: 0rpx 0rpx 0rpx 0rpx;
		padding: 16rpx;
	}
</style>
